<?php get_header(); ?>
 <!--content area -->
 <?php 
  $post_limit = get_option('nano-num-post');
           $cat_name_1 = get_option('nano-cat-1');
           $cat_name_2 = get_option('nano-cat-2');
           $cat_name_3 = get_option('nano-cat-3');
           $home_cat = get_option('silde-home-cata');     
 ?>
    <div id="content_nano">
      <!--banner section -->
      <div id="banner_wrapp">
        <div id="banner">
          <?php if ( get_option('chameleon_featured') == 'on' ) get_template_part('includes/featured'); ?>
        </div><!-- id="banner" -->
                  <?php 
                  /*
                  //  catalogue dong ben trai 

                        <div id="banner_accordion">
                          <div class="acord_box">
                            <div class="hdaccor">
                              <h2>Find out Right Program for you</h2>
                            </div>
                            <div class="slideaccor">
                              <h5>Browse by Category</h5>
                              <ul>
                                <li><a href="#" class="active">Browse undergraduate</a></li>
                                <li><a href="#">Browse postgraduate</a></li>
                            <li><a href="#">Browse Courses</a></li>
                            <li><a href="#">Others</a></li>
                          </ul>
                          <h6>You Already applied?</h6>
                          <a href="#" class="btn_banner1">Order Printed Prospectus</a> <a href="#" class="btn_banner2">Check Application Process</a> </div>
                      </div><!-- class="acord_box" -->
            		  
                      <div class="acord_box">
                        <div class="hdaccor">
                          <h2>International Students</h2>
                        </div>
                        <div class="slideaccor">
                          <div class="student_box"> <img src="<?php bloginfo('template_directory'); ?>/images/img-student.jpg" alt="" />
                            <h2>Jai Parkash ( INDIA)</h2>
                            <p>Lorem ipsum dolor sit amet, ctetur adiiscing elit. Quisque sit amet sem felisLorem ipsum dolor sit amet, ctetur adiiscing elit. Quisque sit amet sem felis    Read More</p>
                          </div>
                        </div>
                      </div><!-- class="acord_box" -->
            		  
                      <div class="acord_box">
                        <div class="hdaccor">
                          <h2>Quick Links</h2>
                        </div>
                        <div class="slideaccor">
                          <ul>
                            <li><a href="#" class="active">Collge Exams List</a></li>
                            <li><a href="#">Illumni</a></li>
                            <li><a href="#">Sports Festivels</a></li>
                            <li><a href="#">National Day</a></li>
                            <li><a href="#">Books and Classis</a></li>
                            <li><a href="#">Our New courses</a></li>
                            <li><a href="#">Famous Courses</a></li>
                            <li><a href="#">A to Z Pages</a></li>
                            <li><a href="#">Top Courses</a></li>
                            <li><a href="#">Staff Section</a></li>
                          </ul>
                          <a href="#" class="btn_banner1">Go to Quick Link Page</a> 
            			</div><!-- class="slideaccor" -->
            			
                      </div><!-- class="acord_box" -->
            		  
                    </div><!-- id="banner_accordion" -->
                */
                ?>
		
      </div><!-- id="banner_wrapp" -->


<?php       
            $cat_id_home= get_catId($home_cat);
            global $post;
            $args = array('numberposts'=>$post_limit, 'category'=>$cat_id_home, 'orderby'=>'date');
            // name cataguery
            //$yourcat = get_category($cat_id_home); if ($yourcat) {echo "<p id='name_home'>" . $yourcat->name . "</p>";}
  ?>
      <div class="study_programs">
        <ul>
          <?php  $custom_posts = get_posts($args);
            foreach($custom_posts as $post) : setup_postdata($post);?>
                  <li>

                     <?php 
                     // images
                     if (has_post_thumbnail()) { ?>
                        <a href="<?php the_permalink(); ?>">
                          <?php the_post_thumbnail(array(311,156)); ?>
                        </a>
                        <?php } else { ?>
                          <a href="<?php the_permalink(); ?>">
                            <img  width="311" height="156" src="<?php echo get_bloginfo('template_directory').'/images/no_image.gif';?>" />
                          </a>
                        <?php } ?>
                    <div class="programdetail">
                        <div class="headingprogram">
                          <h2><?php the_title(); ?></h2>
                        </div><!-- class="headingprogram" -->
                        <div class="detailprogram">
                          <p><?php truncate_post(200); ?></p>
                          <div class="readmore"> <a href="<?php the_permalink();?>"> Đọc thêm</a> </div>
                        </div><!-- class="detailprogram" -->
                    </div> <!-- class="programdetail" -->
                  </li>
          <?php 
            endforeach;
            wp_reset_postdata(); ?>
        </ul>
      </div><!-- class="study_programs" -->

	  
      <!--News and spotlight container -->
      <div class="outer_row">
	  
        <div class="col-left">

          <div class="spotlight_slider">

            <?php 
            $cat_id_2 = get_catId($cat_name_1);
            global $post;
            $args = array('numberposts'=>$post_limit, 'category'=>$cat_id_2, 'orderby'=>'date');
            // name cataguery
            $yourcat = get_category($cat_id_2); if ($yourcat) {echo "<p id='name_home'>" . $yourcat->name . "</p>";}
           
            $custom_posts = get_posts($args);
            foreach($custom_posts as $post) : setup_postdata($post);
            ?>
                <div class="box_spotlight"> 
                    <?php the_post_thumbnail(array(70,65));?>
                    <div class="spot_desc">
                       <p class='name_vie'><a href="<?php the_permalink();?>"><?php the_title(); ?></a></p>
                      <p><?php truncate_post(90); ?> <a href="<?php the_permalink();?>">Đọc thêm</a></p>
                    </div><!-- class="spot_desc" -->
                </div><!-- class="box_spotlight" -->
            <?php 
            endforeach;
            wp_reset_postdata(); ?>

          </div><!-- class="spotlight_slider" -->

		
          <div class="spotlight_slider">
            <?php 
        
            $cat_id = get_catId($cat_name_2);
            global $post;
            $args = array('numberposts'=>$post_limit, 'category'=>$cat_id, 'orderby'=>'date');
            // name cataguery
            $yourcat = get_category($cat_id); if ($yourcat) {echo "<p id='name_home'>" . $yourcat->name . "</p>";}
           
            $custom_posts = get_posts($args);
            foreach($custom_posts as $post) : setup_postdata($post);
            ?>
                <div class="box_spotlight"> 
                    <?php if (has_post_thumbnail()) { ?>
                        <a href="<?php the_permalink(); ?>">
                          <?php the_post_thumbnail(array(70,65)); ?>
                        </a>
                        <?php } else { ?>
                          <a href="<?php the_permalink(); ?>">
                            <img  width="70" height="65" src="<?php echo get_bloginfo('template_directory').'/images/no_image.gif';?>" />
                          </a>
                        <?php } ?>
                    <?php //the_post_thumbnail(array(70,65));?>
                    <div class="spot_desc">
                      <p class='name_vie'><a href="<?php the_permalink();?>"><?php the_title(); ?></a></p>
                      <p><?php truncate_post(90); ?> <a href="<?php the_permalink();?>">Đọc thêm</a></p>
                    </div><!-- class="spot_desc" -->
                </div><!-- class="2_box_spotlight" -->
            <?php 
            endforeach;
            wp_reset_postdata(); ?>
        
          </div><!-- class="spotlight_slider" -->

        </div><!-- class="col-left" -->

		
        <div class="col-right">

          <div class="spotlight_slider">

            <?php 
            // thu vien anh

            $cat_id_3 = get_catId($cat_name_3);
            global $post;
            $args = array('numberposts'=>$post_limit, 'category'=>$cat_id_3, 'orderby'=>'date');
            // name cataguery
            $yourcat = get_category($cat_id_3); if ($yourcat) {echo "<p id='name_home'>" . $yourcat->name . "</p>";}
           
            $custom_posts = get_posts($args);
            foreach($custom_posts as $post) : setup_postdata($post);
            ?>
                <div class="p_box_spotlight" style="margin-bottom: 14px;border-bottom: 1px dotted #b8b8b8;"> 
                    <?php the_post_thumbnail(array(70,65));?>
                    <div class="spot_desc">
                      <p class='name_vie'><a href="<?php the_permalink();?>"><?php the_title(); ?></a></p>
                      <p><?php truncate_post(90); ?> <a href="<?php the_permalink();?>">Đọc thêm</a></p>
                    </div><!-- class="spot_desc" -->
                </div><!-- class="p_box_spotlight" -->
            <?php 
            endforeach;
            wp_reset_postdata(); ?>

          </div><!-- class="spotlight_slider" -->


          <?php
          /*
          <div class="newsletter">
            <h2>University NewsLetter</h2>
            <input type="text" value="Enter Email Address" onfocus="if(this.value == 'Enter Email Address') { this.value = ''; }" onblur="if(this.value == '') { this.value = 'Enter Email Address'; }"  />
            <a href="#">Submit</a> 
		      </div><!-- class="newsletter" -->
			
          <div class="coursesearch">
            <h2>Course Finder</h2>
            <ul>
              <li>
                <label>Enter a Keyword</label>
                <input type="text" value="Search you any keyword"  class="txt1"  onfocus="if(this.value == 'Search you any keyword') { this.value = ''; }" onblur="if(this.value == '') { this.value = 'Search you any keyword'; }" />
              </li>
              <li> <span class="left">
                <label>Degree Type</label>
                <select>
                  <option>Undergraduate</option>
                </select>
                </span> <span class="right">
                <label>Session</label>
                <select>
                  <option>2011-12</option>
                </select>
                </span> </li>
              <li> <span class="left">
                <label>Campus</label>
                <select>
                  <option>Undergraduate</option>
                </select>
                </span> <span class="right">
                <label>Resident Type</label>
                <span class="groupradio">
                <label>
                <input type="radio" name="city" checked="checked" />
                Uk </label>
                <label>
                <input type="radio" name="city"  />
                Wales</label>
                </span> </span> </li>
              <li><a href="#" class="btn_search"><span>Search</span></a></li>
            </ul>
          </div><!-- class="coursesearch" -->

          */
          ?>

		  
        </div><!-- class="col-right" -->
		
      </div><!-- class="outer_row" -->
      <br class="clear" />
    </div><!-- id="content_nano" -->

<?php get_footer(); ?>